From 2993e9e5bb591c39e0bbbad16aff23fe286b5338 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Sun, 29 Oct 2006 09:27:18 -0700 Subject: [PATCH] [IA64] MCA support - use xencomm to copy SAL error log Signed-off-by: Yutaka Ezaki Signed-off-by: Masaki Kanno Signed-off-by: Kazuhiro Suzuki --- linux-2.6-xen-sparse/include/asm-ia64/sal.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/linux-2.6-xen-sparse/include/asm-ia64/sal.h b/linux-2.6-xen-sparse/include/asm-ia64/sal.h index 0b210abbe0..0cda1c410b 100644 --- a/linux-2.6-xen-sparse/include/asm-ia64/sal.h +++ b/linux-2.6-xen-sparse/include/asm-ia64/sal.h @@ -42,6 +42,9 @@ #include #include #include +#ifdef CONFIG_XEN +#include +#endif extern spinlock_t sal_lock; @@ -686,10 +689,28 @@ ia64_sal_clear_state_info (u64 sal_info_type) /* Get the processor and platform information logged by SAL with respect to the machine * state at the time of the MCAs, INITs, CMCs, or CPEs. */ +#ifdef CONFIG_XEN +static inline u64 ia64_sal_get_state_info_size (u64 sal_info_type); +#endif + static inline u64 ia64_sal_get_state_info (u64 sal_info_type, u64 *sal_info) { struct ia64_sal_retval isrv; +#ifdef CONFIG_XEN + if (is_running_on_xen()) { + struct xencomm_mini xc_area[2]; + int nbr_area = 2; + struct xencomm_handle *desc; + + if (xencomm_create_mini(xc_area, &nbr_area, sal_info, + ia64_sal_get_state_info_size(sal_info_type), &desc)) + return 0; + + SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0, + desc, 0, 0, 0, 0); + } else +#endif SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0, sal_info, 0, 0, 0, 0); if (isrv.status) -- 2.30.2